package org.androidmangher.service.impl;

import org.androidmangher.bean.User;
import org.androidmangher.mapper.UserMapper;
import org.androidmangher.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public List<User> getUserList() {
        List<User> userList = userMapper.getUserList();

        return userList;
    }

    @Override
    public List<User> getUserListXML() {
        List<User> userList = userMapper.getUserList2();
        return userList;
    }

    @Override
    public User getOneUser(User user_check) {

        User user = userMapper.getOneUser(user_check);
        return user;
    }

    @Override
    public User insertOneUser(User user) {
        User userinfo = userMapper.insertOneUser(user);
        return userinfo;
    }
}